from django.urls import path

from .views import UserView, ReView, LoginView, \
    LogoutView, SendEmailView, ActiveUserView, FavView, \
    UserFavView, UserHistory, ChangePic, ChangeInfo, ChangePassword, UserVideoView, UserVideoDeleteView, \
    UserMessageView, UserMessageDeleteView, UserDeleteHistoryView, UserDetailView, RealNameAuthentication, \
    SaveSecretQuestion, BoundEmail, BoundEmailActive, ForgetPwdView, CheckUser, UseSecretToGetPwd, CheckEmailBound, \
    RenewPwdSendEmail, EmailRenewPwdView

urlpatterns = [
    path('', UserView.as_view(), name='user'),
    path('fav/', UserFavView.as_view(), name='user_fav'),
    path('history/', UserHistory.as_view(), name='user_history'),
    path('history/delete/', UserDeleteHistoryView.as_view(), name='user_history_delete'),
    path('change/pic/', ChangePic.as_view(), name='change_pic'),
    path('change/info/', ChangeInfo.as_view(), name='change_info'),
    path('change/password/', ChangePassword.as_view(), name='change_password'),
    path('video/', UserVideoView.as_view(), name='user_video'),
    path('video/delete/', UserVideoDeleteView.as_view(), name='user_video_delete'),
    path('message/', UserMessageView.as_view(), name='user_message'),
    path('message/delete/', UserMessageDeleteView.as_view(), name='user_message_delete'),
    path('detail/user/', UserDetailView.as_view(), name='detail_user'),
    path('user/fav/', FavView.as_view(), name='add_fav'),
    path('user/realname/', RealNameAuthentication.as_view(), name='real_name'),  # 实名认证

    # 忘记密码
    path('forget_pwd/', ForgetPwdView.as_view(), name='forget_pwd'),
    path('check_user/', CheckUser.as_view(), name='check_user'),
    path('secret_get_pwd/', UseSecretToGetPwd.as_view(), name='secret_get_pwd'),
    path('check_email/', CheckEmailBound.as_view(), name='check_email'),
    path('renewpwd_sendemail/', RenewPwdSendEmail.as_view(), name='renewpwd_sendemail'),
    path('forget/', EmailRenewPwdView.as_view(), name='forget'),

    # 注册 登录
    path('re/', ReView.as_view(), name='re'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('re/email/', SendEmailView.as_view(), name='re_email'),
    path('active/<str:active_code>/', ActiveUserView.as_view(), name='active_code'),

    # 密保
    path('save_secret/', SaveSecretQuestion.as_view(), name='save_secret'),
    # 绑定邮箱
    path('bound_email/', BoundEmail.as_view(), name='bound_email'),
    path('bound/<str:active_code>/', BoundEmailActive.as_view(), name='active_code')
]
